home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / Amos / AMOSList-1297 / AMOSLIST / text0203.txt < prev    next >
Encoding:
Text File  |  1998-06-24  |  5.6 KB  |  223 lines

  1. It was on the night of 26-Dec-97, when no creatures were stirring, and all was
  2. silent. Suddenly, Jens jumped out from behind a rock and wouldnt stop shouting
  3. about "Inituition.." until I was forced to knock them out:
  4. »-> Hello, GUI help, please..
  5.  
  6. »-> I've found a great way of doing almost everthing I want to do with
  7. inituition
  8. »-> (AGA screens, and easy msg-boxes). Using a combination of the
  9. GUI-extension
  10. »-> and the OSDevkit.. Ok so far so good. But I can't find a way to get a
  11. »-> 'mouse key' or 'mouse click' response on an inituition screen. I saw that
  12. »-> the there was written a 'paint-program' with the GUI extension, how the
  13. »-> hell (sorry) is it posible to allow the user to point and click on a
  14. 'free'
  15. »-> screen with no gadgets ????
  16.  
  17. »-> If this is part of the 'test-version' of the next GUI, then is it possible
  18. »-> that I could have a copy of the test-version (I'll be sure to send my
  19. »-> response to the author) ???
  20.  
  21. Here is the ASCII listing for the program. When you look through it, you
  22. will see its a very simple process!!
  23.  
  24. Mush
  25.  
  26. '**
  27. '**      $VER: Micro Paint 1.0  (09-08-97)   
  28. '**      Update Release 1.0  
  29. '**
  30. '**      Simple Paint Package  
  31. '**
  32. '**      © Copyright 1997 Pietro Ghizzoni - Dairymen Soft
  33. '**        FreeWare      
  34. '**
  35.  
  36. Amos To Back 
  37.  
  38. Dim GR(6),CO(1) : Gui Bank 20 : WINS=2 : WIN3=3
  39. Global X,Y,X1,Y1,FUNC,GR(),WIN
  40.  
  41. Repeat : ID=Gui Asl Screen : Until ID><0 : &J1
  42.  
  43. Gui Open 2,2 : Gui Ink 1 : Gui Open 3,3 : Gui Ink 1
  44. Change 2,True : Change 3,True
  45. Loke (1,0,,$80080010),Min(Gui Asl Colours,8)
  46.  
  47. ABOUT : Gui Open 1,1 : CO(0)=1 : CO(1)=1 : FUNC=2 : Gui Set 1,0,0,1 : Gui Gfx
  48. 0,3
  49. Restore WR_DATA : For I=1 To 6 : Read GR(I) : Next 
  50.  
  51. Do 
  52.    
  53.    GAD=Gui Wait : CO=Gui Code : WIN2=WIN : WIN=Gui Window
  54.    
  55.    If WIN=1
  56.       
  57.       If GAD>0 and GAD<6 : FUNC=GAD : End If 
  58.       
  59.       If GAD=0
  60.          Gui Set 1,0,0,CO : Gui Ink CO : CO(WIN3-2)=CO
  61.          
  62.       Else If GAD=6
  63.          Gui Writing 1 : Gui Clw ,
  64.          
  65.       Else If GAD=-1
  66.          
  67.          Exit 
  68.          
  69.       End If 
  70.       
  71.    Else 
  72.       
  73.       If WIN2><WIN : Gui Gfx 0,WIN : Gui Set 1,0,0,CO(WIN-2) : End If 
  74.       X=Gui Mouse Ux : Y=Gui Mouse Uy : X1=X : Y1=Y : WIN3=WIN
  75.       
  76.       If GAD=-11
  77.          
  78.          If CO=$68
  79.             
  80.             Gui Writing GR(FUNC)
  81.             
  82.             If FUNC=1
  83.                
  84.                Repeat 
  85.                   X=Gui Mouse Ux : Y=Gui Mouse Uy : Gui Plot X,Y : EV=Gui Wait
  86.                   If EV=-12 : Gui Titles WIN,"Micro Paint Work Window
  87. X:"+Str$(X)+" Y:"+Str$(Y),"" : End If 
  88.                Until EV=-11
  89.                
  90.             Else If FUNC=2
  91.                
  92.                _LINE
  93.                
  94.             Else If FUNC=3
  95.                
  96.                _BOX
  97.                
  98.             Else If FUNC=4
  99.                
  100.                _ELLIPSE
  101.                
  102.             Else If FUNC=5
  103.                
  104.                Trap Gui Paint X,Y
  105.                If Errtrap : _REQ["Error","Not enough memory to perform
  106. operation!"] : End If 
  107.                
  108.             End If 
  109.             
  110.             
  111.          End If 
  112.          
  113.       Else If GAD=-12
  114.          
  115.          Gui Titles WIN,"Micro Paint Work Window X:"+Str$(X)+" Y:"+Str$(Y),""
  116.          
  117.       Else If GAD=-1
  118.          
  119.          A=Gui Close(WIN) : Dec WINS : Exit If WINS=0
  120.          
  121.       End If 
  122.       
  123.    End If 
  124.    
  125. Loop 
  126.  
  127. 1 : End 
  128.  
  129. Procedure _LINE
  130.    
  131.    Repeat 
  132.       
  133.       If X1<>Gui Mouse Wx or Y1><Gui Mouse Wy
  134.          Gui Draw X,Y To X1,Y1 : X1=Gui Mouse Wx : Y1=Gui Mouse Wy : Gui Draw
  135. X,Y To X1,Y1
  136.          Gui Titles WIN,"Micro Paint Work Window X:"+Str$(X1-X)+"
  137. Y:"+Str$(Y1-Y),""
  138.       End If 
  139.       
  140.    Until Gui Event=-11
  141.    Gui Writing 1 : Gui Draw X,Y To X1,Y1 : Gui Titles WIN,"Micro Paint Work
  142. Window",""
  143.    
  144. End Proc
  145. Procedure _BOX
  146.    
  147.    Repeat 
  148.       
  149.       If X1<>Gui Mouse Wx or Y1><Gui Mouse Wy
  150.          Gui Bar X2,Y2 To X3,Y3
  151.          X1=Gui Mouse Wx : Y1=Gui Mouse Wy : X2=X : X3=X1 : Y2=Y : Y3=Y1
  152.          If X1<X : X2=X1 : X3=X : End If 
  153.          If Y1<Y : Y2=Y1 : Y3=Y : End If 
  154.          Gui Bar X2,Y2 To X3,Y3
  155.          Gui Titles WIN,"Micro Paint Work Window X:"+Str$(X3-X2)+"
  156. Y:"+Str$(Y3-Y2),""
  157.       End If 
  158.       
  159.    Until Gui Event=-11
  160.    Gui Writing 1 : Gui Bar X2,Y2 To X3,Y3 : Gui Titles WIN,"Micro Paint Work
  161. Window",""
  162.    
  163. End Proc
  164. Procedure _ELLIPSE
  165.    Repeat 
  166.       
  167.       If X1<>Gui Mouse Wx or Y1><Gui Mouse Wy
  168.          Gui Ellipse X,Y,Abs(X1-X),Abs(Y1-Y) : X1=Gui Mouse Wx : Y1=Gui Mouse
  169. Wy
  170.          Gui Ellipse X,Y,Abs(X1-X),Abs(Y1-Y)
  171.          Gui Titles WIN,"Micro Paint Work Window X:"+Str$(X1-X)+"
  172. Y:"+Str$(Y1-Y),""
  173.       End If 
  174.       
  175.    Until Gui Event=-11
  176.    Gui Writing 1 : Gui Ellipse X,Y,Abs(X1-X),Abs(Y1-Y) : Gui Titles WIN,"Micro
  177. Paint Work Window",""
  178.    
  179. End Proc
  180. Procedure ABOUT
  181.    
  182.    TX=Gui Len("The BEST paint package every made! :)))") : SP=Gui Len(" ")
  183.    
  184.    For I=1 To 9
  185.       Read A$ : B$=Space$(Max((TX-Gui Len(A$))/2/SP,0))
  186.       M$=M$+B$+A$+B$+Chr$(10)
  187.    Next 
  188.    A=Gui Req("About...",M$,"Oh no... don't click me!")
  189.    
  190.    
  191.    Data "Micro Paint 1.0"
  192.    Data "©1997 Pietro Ghizzoni"
  193.    Data "Dairymen Soft"
  194.    Data ""
  195.    Data "The BEST paint package every made! :)))"
  196.    Data ""
  197.    Data "Powered by"
  198.    Data ""
  199.    Data "GUI Extension v1.63"
  200.    
  201. End Proc
  202. Procedure _REQ[T$,M$]
  203.    
  204.    A=Gui Req(T$,M$,"Ok") : Gui Beep 
  205.    
  206. End Proc
  207.  
  208. WR_DATA:
  209. Data 1,2,2,2,1,1
  210.  
  211. Andrew "Mushroom" Kellett
  212. --
  213.  Email: Andy Kellett <mushypd@redrose.net>  Team *AMOS* + IAPA Team *AMIGA*
  214.   alt.religion.amos - AMOS now on usenet! AMOS Mailinglist also mirrored
  215.  
  216.      World's Largest AMOS Homepages - http://www.mushy-pd.demon.co.uk
  217.                Official F1 Software Distributor for the USA
  218.  
  219.          Massive FTP site with AMOS/C64 and Mods/Samples + more at
  220.                             mushy-pd.dyn.ml.org
  221.  
  222.  
  223.